package com.edu.service.impl;

import com.edu.dao.UserDao;
import com.edu.dao.impl.UserDaoImpl;
import com.edu.service.UserService;

/**
 * @Author:mx
 * @Date:2025/11/17-17:17:09
 */
public class UserServiceImpl implements UserService {

    private UserDao userDao = new UserDaoImpl();
    @Override
    public int transferMoney(int userId1, int userId2, double money) {

        userDao.update(userId1,-money);
        System.out.println(1/0);
        userDao.update(userId2,+money);

        return 0;
    }
}
